home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / infoplus.zip / PAGE_02.INC < prev    next >
Text File  |  1990-06-25  |  2KB  |  81 lines

  1. procedure page_02;
  2.  
  3. var
  4.   cpu_info : cpu_info_t;
  5.  
  6. procedure showNDP(a : string; b : word);
  7.  
  8. begin
  9.   writeln(a);
  10.   caption2('  Infinity');
  11.   case b and $1000 of
  12.     $0000 : writeln('projective');
  13.     $1000 : writeln('affine')
  14.   end;
  15.   caption2('  Rounding');
  16.   case b and $0C00 of
  17.     $0000 : writeln('to nearest or even');
  18.     $0400 : writeln('down');
  19.     $0800 : writeln('up');
  20.     $0C00 : writeln('chop')
  21.   end;
  22.   caption2('  Precision');
  23.   case b and $0300 of
  24.     $0000 : writeln('24 bits');
  25.     $0100 : writeln('(reserved)');
  26.     $0200 : writeln('53 bits');
  27.     $0300 : writeln('64 bits')
  28.   end
  29. end;
  30.  
  31. begin (* procedure page_02 *)
  32.   caption2('CPU');
  33.   CPUID(cpu_info);
  34.   with cpu_info do begin
  35.     case cpu_type of
  36.       $00 : writeln('8088');
  37.       $01 : writeln('8086');
  38.       $02 : writeln('V20');
  39.       $03 : writeln('V30');
  40.       $04 : writeln('80188');
  41.       $05 : writeln('80186');
  42.       $06 : writeln('80286');
  43.       $07 : writeln('80386');
  44.       $08 : Writeln('80486')
  45.       else
  46.         unknown('CPU', cpu_type, 2)
  47.     end;
  48.     case cpu_type of
  49.       $06..$08 : begin
  50.         caption3('Machine State Word');
  51.         writeln(hex(MSW, 4));
  52.         caption3('Global Descriptor Table   ');
  53.         for i:=1 to 6 do
  54.           write(hex(GDT[i], 2), ' ');
  55.         writeln;
  56.         caption3('Interrupt Descriptor Table');
  57.         for i:=1 to 6 do
  58.           write(hex(IDT[i], 2), ' ');
  59.         writeln
  60.       end
  61.     end;
  62.     caption3('Interrupts acknowledged immediately after segment register'
  63.       + ' change');
  64.     yesorno(intflag);
  65.     caption2('Coprocessor');
  66.     if cpu_type = $08 then
  67.       showNDP('80486', ndp_cw) {'486 has coprocessor built in}
  68.     else
  69.       case ndp_type of
  70.         $00 : writeln('none');
  71.         $01 : showNDP('8087', ndp_cw);
  72.         $02 : showNDP('80287', ndp_cw);
  73.         $03 : showNDP('80387', ndp_cw)
  74.       else
  75.         unknown('coprocessor', ndp_type, 4)
  76.       end
  77.   end;
  78.   caption2('Coprocessor enabled');
  79.   yesorno(equip and $0002 = $0002)
  80. end;
  81.